package com.unicom.mec.device.remote;

import com.unicom.mec.device.common.ResultBean;
import com.unicom.mec.device.vo.TenantVo;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@FeignClient(name= "user")
public interface UserRemote {

    @GetMapping("/tenant/findTenantIdByUniqueKey/{uniqueKey}")
    @ResponseBody
    ResultBean<Long> findTenantIdByUniqueKey(@PathVariable("uniqueKey") String uniqueKey);

    @GetMapping("/tenant/findTenantById/{id}")
    @ResponseBody
    ResultBean<TenantVo> findTenantById(@PathVariable("id") Long id);

    @GetMapping("/tenant/findTenantByIds/{ids}")
    @ResponseBody
    ResultBean<List<TenantVo>> findTenantByIds(@PathVariable("ids") Long[] ids);
}
